//
//  Brand_ExploreRecommend_Cell_WX.m
//  ZITHER
//
//  Created by weixin on 2019/5/20.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Brand_ExploreRecommend_Cell_WX.h"
#import "Brand_ExploreRecommendBrandImg_View_WX.h"
#import "Brands_BrandsMain_VC_WX.h"
@implementation Brand_ExploreRecommend_Cell_WX

- (void)awakeFromNib {
    [super awakeFromNib];
    [self setMasmay];

}



-(void)setBFModel:(goodsBrandMyFollowModel *)BFModel{
    _BFModel = BFModel;
    if ([BFModel.type isEqualToString:@"0"]) {
        self.TopTitle.title.text = @"推荐关注";
    }else{
        self.TopTitle.title.text = @"关注的品牌";
    }
    self.scr.BFModel = BFModel;
    
}




-(void)setMasmay{
    [self addSubview:self.TopTitle];
    [self addSubview:self.scr];
    [self addSubview:self.attentionMoreBtn];
    

    [self.TopTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.equalTo(self).offset(0);
        make.height.mas_equalTo(40);
    }];
    
    [self.scr mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self).offset(0);
        make.height.mas_equalTo(115);
        make.top.equalTo(self.TopTitle.mas_bottom).offset(10);
    }];
    
    [self.attentionMoreBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.equalTo(self).offset(0);
        make.height.mas_equalTo(15);
        make.top.equalTo(self.scr.mas_bottom).offset(25);
        make.bottom.equalTo(self).offset(-50);
    }];
    
    
}

- (Brand_ExploreTitle_View_WX *)TopTitle{
    if (!_TopTitle) {
        _TopTitle = [[Brand_ExploreTitle_View_WX alloc]init];
    }
    return _TopTitle;
}

-(Brand_ExploreRecommendBrand_Scr_WX *)scr{
    if (!_scr) {
        _scr = [[Brand_ExploreRecommendBrand_Scr_WX alloc]initWithFrame:CGRectZero];
    }
    return _scr;
}

-(BaseBtn *)attentionMoreBtn{
    if (!_attentionMoreBtn) {
        _attentionMoreBtn = [BaseBtn initCustomBtnImageAndTitles:@[@"关注更多"] images:@[@"探索_关注"] color:@[baseColorTheme]];
        _attentionMoreBtn.titleLabel.font = [UIFont fontWithName:@"PingFangSC-Medium" size:12];
        
        [[_attentionMoreBtn addTag]subscribeNext:^(id  _Nullable x) {
            Brands_BrandsMain_VC_WX *vc = [[Brands_BrandsMain_VC_WX alloc]init];
            [self.getNav pushViewController:vc animated:YES];
        }];
    }
    return _attentionMoreBtn;
}



@end
